<!DOCTYPE html>
<html>

	<head>
		<meta charset="UTF-8">
		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
		<link rel="stylesheet" type="text/css" href="__STATIC__/home/css/reset.css" />
		<script src="__STATIC__/home/js/base.js" type="text/javascript" charset="utf-8"></script>
		<title>夺宝</title>
		<style type="text/css">
			.wrapper {
				background: #ececec;
				height: 100%;
				overflow: hidden;
				position: relative;
			}
			
			.top {
				width: 100%;
				height: 1.72rem;
				position: relative;
				border-bottom: 2px solid #e5e5e5;
				background: #FFFFFF;
			}
			
			.touxiang {
				position: absolute;
				width: 1.24rem;
				height: 1.24rem;
				border-radius: 50%;
				overflow: hidden;
				top: 0.24rem;
				left: 0.24rem;
			}
			
			.kuang {
				width: 1.24rem;
				height: 1.24rem;
			}
			
			.top-p {
				position: absolute;
				bottom: 0.24rem;
				left: 1.74rem;
				font-size: 0.32rem;
				color: #8d8d8d;
			}
			
			.top-div1 {
				width: 3.1rem;
				height: 0.58rem;
				background: #ef4532;
				color: #FFFFFF;
				/*box-shadow:0 0.05rem   rgba(239, 69, 50, 0.7);*/
				border-radius: 0.29rem;
				position: absolute;
				bottom: 0.2rem;
				right: 0.26rem;
			}
			
			.top-div2 {
				height: 0.58rem;
				color: #FFFFFF;
				line-height: 0.58rem;
				text-align: center;
				font-size: 0.3rem;
				position: absolute;
				left: 0;
				top: 0;
			}
			
			.top-div3 {
				font-size: 0.3rem;
				line-height: 0.58rem;
				text-align: center;
				height: 0.58rem;
				float: right;
			}
			
			.top-change {
				background: #F8CE2C;
				border-radius: 0.29rem;
				width: 54.8%;
			}
			
			.font-change {
				opacity: 0.4;
				width: 45.2%;
			}
			
			.duobaoWra {
				width: 100%;
				height: 2.36rem;
				padding: 0.12rem;
				border-bottom: 0.02rem solid #E5E5E5;
				background: #FFFFFF;
			}
			
			.duobaowenzi {
				font-size: 0.26rem;
				color: #000000;
				opacity: 0.8;
			}
			
			.danwei {
				width: 100%;
				/*display: inline-block;*/
				height: 0.66rem;
				margin-top: 0.2rem;
			}
			
			.danwei>li {
				display: inline-block;
				font-size: 0.3rem;
				font-family: PingFang-SC-Bold;
				color: #8D8D8D;
				margin-top: 0.1rem;
				margin-left: 0.75rem;
				margin-right: 0.05rem;
				vertical-align: top;
				margin-bottom: 0.24rem;
			}
			
			.number {
				width: 100%;
				/*padding-left: 0.0rem;*/
				margin-top: 0.1rem;
			}
			/*.number li{
				display: inline-block;
			}*/
			
			.number>li {
				vertical-align: top;
				display: inline-block;
				width: 0.81rem;
				height: 0.81rem;
				border-radius: 50%;
				font-size: 0.46rem;
				font-family: PingFang-SC-Bold;
				color: rgba(0, 0, 0, 0.6);
				color: #8D8D8D;
				line-height: 0.81rem;
				text-align: center;
			}
			
			.number span {
				font-size: 0.46rem;
				vertical-align: top;
				display: inline-block;
				width: 0.81rem;
				height: 0.81rem;
				border-radius: 50%;
				font-size: 0.46rem;
				font-family: PingFang-SC-Bold;
				color: rgba(0, 0, 0, 0.6);
				color: #8D8D8D;
				line-height: 0.81rem;
				text-align: center;
			}
			
			.weixuanzhong {
				/*width: 0.86rem !important;*/
				/*background: #fafafa;*/
				background: #C6C6C6;
			}
			
			.xuanzhong {
				background-image: url(__STATIC__/home/images/maozhua.png);
				background-size: 100% 100%;
			}
			
			.font {
				color: #000000 !important;
			}
			
			.number>li:nth-of-type(1) {
				margin-left: 0.45rem;
				margin-right: 0.35rem;
			}
			
			.number>li:nth-of-type(2) {
				margin-right: 0.25rem;
			}
			
			.number>li:nth-of-type(3) {
				margin-right: 0.3rem;
			}
			
			.number>li:nth-of-type(4) {
				margin-right: 0.3rem;
			}
			
			.number>li:nth-of-type(5) {
				margin-right: 0.25rem;
			}
			
			.dxWra {
				width: 7.03rem;
				height: 4.45rem;
				background: #FFFFFF;
				margin: auto;
				margin-top: 0.19rem;
				position: relative;
				margin-bottom: 0.23rem;
			}
			
			.dxWra>img {
				position: absolute;
				width: 1.09rem;
			}
			
			.dxWra>img:nth-of-type(1) {
				top: 0.25rem;
				left: 0.25rem;
			}
			
			.dxWra>img:nth-of-type(2) {
				top: 1.38rem;
				left: 0.25rem;
			}
			
			.zhushu>img {
				width: 0.55rem;
				height: 0.55rem;
				margin-top: 0.55rem;
				margin-left: 0.35rem;
				margin-right: 0.2rem;
			}
			
			.zhushu{
				margin-left: 2.32rem;
			}
			
			.zhushu>span:nth-of-type(1) {
				margin-left: 2.03rem;
			}
			/*.zhushu>span:nth-of-type(3) {
				background: #FF4747;
				color: #FFFFFF;
			}*/
			/*.zhushu>span:nth-of-type(4) {
				font-size: 0.3rem;
				color: #FFFFFF;
				background: #FF4747;
			}*/
			
			.dbxuanze,
			.queding {
				display: inline-block;
				width: 1.42rem;
				height: 0.53rem;
				background: #FF4747;
				color: #FFFFFF;
				font-size: 0.3rem;
				text-align: center;
				line-height: 0.53rem;
				border-radius: 0.26rem;
				vertical-align: top;
				margin-top: 0.32rem;
			}
			
			.dbxuanze {
				margin-left: 3.32rem;
				margin-right: 0.1rem;
			}
			
			.dxList {
				position: relative;
				top: -0.25rem;
				height: 0.4rem;
				vertical-align: top;
			}
			
			.dxList>li {
				display: inline-block;
				font-size: 0.26rem;
				color: #000000;
				opacity: 0.6;
				margin-right: 0.8rem;
				vertical-align: top;
				margin-top: 0.12rem;
				line-height: 0;
			}
			
			.dxList>li:nth-of-type(1) {
				margin-left: 1.48rem;
			}
			
			.jiluWra {
				width: 7.03rem;
				background: #FFFFFF;
				margin: auto;
			}
			
			.jilutop {
				height: 0.86rem;
			}
			
			.jilutop>h3 {
				vertical-align: top;
				display: inline-block;
				height: 0.86rem;
				line-height: 0.86rem;
				color: #585858;
				font-size: 0.4rem;
				margin-left: 1.78rem;
			}
			
			.jilutop>span {
				vertical-align: top;
				margin-top: 0.34rem;
				display: inline-block;
				font-size: 0.22rem;
				color: #FFFFFF;
				background: #fcd953;
				width: 1.58rem;
				height: 0.3rem;
				line-height: 0.3rem;
				text-align: center;
				border-radius: 0.14rem;
			}
			
			.shujuKuang {
				/*width: 4.37rem;*/
				height: 1.68rem;
				margin-left: 1.32rem;
				margin-top: 0.12rem;
				position: relative;
			}
			
			.news1,
			.news2,
			.news3,
			.news4,
			.news5,
			.news6 {
				height: 100%;
				overflow: hidden;
			}
			
			.news1 li,
			.news2 li,
			.news3 li,
			.news4 li,
			.news5 li,
			.news6 li {
				font-size: 0.2rem;
				color: #a3a3a3;
			}
			
			.news1 span:nth-of-type(2),
			.news2 span:nth-of-type(2),
			.news3 span:nth-of-type(2),
			.news4 span:nth-of-type(2),
			.news5 span:nth-of-type(2) {
				margin-left: 0.64rem;
				margin-right: 0.56rem;
			}
			
			.jianbian1 {
				position: absolute;
				top: 0;
				width: 100%;
				height: 0.5rem;
				background-image: -webkit-linear-gradient(top, rgba(255, 255, 255, 1) 0%, rgba(255, 255, 255, 0.6) 40%, rgba(255, 255, 255, 0.4) 60%, rgba(255, 255, 255, 0.2) 80%, rgba(255, 255, 255, 0) 100%);
			}
			
			.jianbian2 {
				position: absolute;
				bottom: 0;
				width: 100%;
				height: 0.5rem;
				background-image: -webkit-linear-gradient(bottom, rgba(255, 255, 255, 1) 40%, rgba(255, 255, 255, 0.5) 80%, rgba(255, 255, 255, 0) 100%);
			}

			.mengbanWra,
			.zhushuWra,
			.danweiWra,
			.dxzsKuang,
			.goumaiWra {
				width: 100%;
				position: absolute;
				background: rgba(0, 0, 0, 0.4);
				top: 0;
				display: none;
			}
			
			.touzhutankuang {
				width: 6.33rem;
				height: 3.34rem;
				background: #FFFFFF;
				margin: 4.45rem 0.67rem 5.59rem 0.66rem;
				border-radius: 0.1rem;
				padding-top: 0.26rem;
			}
			
			.numberList {
				width: 100%;
				height: 70%;
				overflow: hidden;
				display: flex;
				flex-direction: row;
				flex-wrap: wrap;
				justify-content: flex-start;
			}
			
			.numberList>li {
				width: 0.81rem;
				height: 0.81rem;
				line-height: 0.81rem;
				background: #C6C6C6;
				border-radius: 50%;
				text-align: center;
				display: inline-block;
				font-size: 0.46rem;
				color: rgba(0, 0, 0, 0.6);
				margin-left: 0.26rem;
				margin-right: 0.15rem;
				vertical-align: middle;
			}
			

			
			.touzhutankuang>span {
				display: inline-block;
				width: 1.42rem;
				height: 0.53rem;
				background: #FF4747;
				border-radius: 0.26rem;
				text-align: center;
				line-height: 0.53rem;
				font-size: 0.3rem;
				color: #FFFFFF;
				margin-left: 2.47rem;
				vertical-align: top;
				margin-top: 0.05rem;
			}
			/*.zhushuWra{
				display: block;
			}*/


			.zhushu>img {
				width: 0.55rem;
				height: 0.55rem;
				margin-top: 0.55rem;
				margin-left: 0.35rem;
				margin-right: 0.2rem;
			}

			.zhushu>img:nth-of-type(2) {
				margin-left: 0.2rem;
			}

			.zhushu>input {
				display: inline-block;
				width: 1.78rem;
				height: 0.68rem;
				line-height: 0.68/rem;
				border: 0.02rem solid #8D8D8D;
				border-radius: 0.1rem;
				font-size: 0.4rem;
				color: #373543;
				text-align: center;
			}

			.zhushu>input::-webkit-input-placeholder {
				color: #373543;
			}

			.zhushu>input::-ms-input-placeholder {
				color: #373543;
			}

			.zhushu>p {
				width: 1.42rem;
				height: 0.53rem;
				background: #FF4747;
				border-radius: 0.26rem;
				text-align: center;
				line-height: 0.53rem;
				font-size: 0.3rem;
				color: #FFFFFF;
				margin: auto;
				margin-top: 0.15rem;
			}






			.zhushuokuang {
				width: 4.65rem;
				height: 2.41rem;
				background: #FFFFFF;
				border-radius: 0.1rem;
				margin-top: 5.41rem;
				margin-left: 1.5rem;
				margin-bottom: 5.51rem;
			}
			
			.zhushuokuang>img {
				width: 0.55rem;
				height: 0.55rem;
				margin-top: 0.55rem;
				margin-left: 0.35rem;
				margin-right: 0.2rem;
			}
			
			.zhushuokuang>img:nth-of-type(2) {
				margin-left: 0.2rem;
			}
			
			.zhushuokuang>input {
				display: inline-block;
				width: 1.78rem;
				height: 0.68rem;
				line-height: 0.68/rem;
				border: 0.02rem solid #8D8D8D;
				border-radius: 0.1rem;
				font-size: 0.4rem;
				color: #373543;
				text-align: center;
			}
			
			.zhushuokuang>input::-webkit-input-placeholder {
				color: #373543;
			}
			
			.zhushuokuang>input::-ms-input-placeholder {
				color: #373543;
			}
			
			.zhushuokuang>p {
				width: 1.42rem;
				height: 0.53rem;
				background: #FF4747;
				border-radius: 0.26rem;
				text-align: center;
				line-height: 0.53rem;
				font-size: 0.3rem;
				color: #FFFFFF;
				margin: auto;
				margin-top: 0.15rem;
			}
			
			.danweiWra {
				/*display: block;*/
			}
			
			.danweiKuang {
				width: 6.33rem;
				height: 2.63rem;
				background: #FFFFFF;
				margin: 5.15rem 0.67rem 5.61rem 0.66rem;
				border-radius: 0.1rem;
			}
			
			.danweiKuang>ul {
				display: flex;
				justify-content: flex-start;
			}
			
			.danweiKuang>ul>li {
				display: inline-block;
				width: 0.86rem;
				height: 0.86rem;
				background: #CCCCCC;
				border-radius: 50%;
				vertical-align: top;
				color: rgba(0, 0, 0, 0.6);
				font-size: 0.36rem;
				margin-left: 0.23rem;
				margin-right: 0.23rem;
				margin-top: 0.6rem;
				text-align: center;
				line-height: 0.86rem;
			}
			
			.beijingtu {
				background: url(__STATIC__/home/images/maozhua.png) !important;
				background-size: 100% 100% !important;
				color: #000 !important;
			}
			
			.danweiKuang>p,
			.dxzsk>p {
				width: 1.42rem;
				height: 0.53rem;
				background: #ff4747;
				color: #FFFFFF;
				font-size: 0.3rem;
				text-align: center;
				line-height: 0.53rem;
				border-radius: 0.26rem;
				margin: auto;
				margin-top: 0.41rem;
			}
			
			.dxzsKuang {
				/*display: block;*/
			}
			
			.dxzsk {
				width: 5.73rem;
				height: 2.43rem;
				margin: 5.35rem 0.97rem 5.61rem 0.96rem;
				background: #FFFFFF;
				border-radius: 0.1rem;
			}
			
			.dxzsk>ul {
				display: flex;
				justify-content: flex-start;
			}
			
			.dxzsk>ul>li {
				width: 0.81rem;
				height: 0.81rem;
				border-radius: 50%;
				background: #FAFAFA;
				line-height: 0.81rem;
				text-align: center;
				color: #000000;
				margin-top: 0.42rem;
				margin-left: 0.53rem;
				font-size: 0.3rem;
			}
			
			.dxzskBag {
				background: #FF4747 !important;
				color: #FFFFFF !important;
			}
			/*.goumaiWra{
				display: block;
			}*/
			
			.goumai {
				width: 4.91rem;
				background: #FFFFFF;
				margin: 4.84rem 1.37rem 5rem 1.23rem;
				padding: 0.23rem 0rem 0.23rem 0.48rem;
				font-size: 0.3rem;
				color: rgba(0, 0, 0, 0.6);
			}
			
			.goumai>p:nth-of-type {
				font-size: 0.3rem;
				color: rgba(0, 0, 0, 0.6);
			}
			
			.goumai>ul div {
				display: inline-block;
			}
			
			.goumai>ul p {
				display: inline-block;
			}
			
			.goumai>p {
				margin-top: 0.21rem;
			}
			
			.xuanze {
				margin-top: 0.21rem;
			}
			
			.xuanze>p {
				display: inline-block;
				width: 1.42rem;
				height: 0.53rem;
				background: #FF4747;
				text-align: center;
				line-height: 0.53rem;
				border-radius: 0.26rem;
				color: #FFFFFF;
				font-size: 0.3rem;
			}
			
			.xuanze>p:nth-of-type(1) {
				margin-left: 0.5rem;
				margin-right: 0.49rem;
			}
		</style>
	</head>

	<body>
		<div class="wrapper">
			<div class="top">
				<div class="touxiang">
					<img src="__STATIC__/img/{$user.user_pic}" class="kuang" />
				</div>
				<p class="top-p">{$user.name}</p>
				<div class="top-div1">
					<div class="top-div2 font-change"><a href="betPage.html">五分彩</a></div>
					<div class="top-div3 top-change">十分彩</div>
				</div>
			</div>
			<!-- 正在投<span></span>-->
			<div class="duobaoWra">
				<p class="duobaowenzi">
					<span></span>
				</p>
				<ul class="danwei">
					<li>万</li>
					<li>千</li>
					<li>百</li>
					<li>十</li>
					<li>个</li>
				</ul>
				<!--数字列表-->
				<ul class="number">
					<li class="weixuanzhong">
						<div class="news1" val="万">
							<ul>
								<li>
									<span>0</span>
								</li>
								<li>
									<span>1</span>
								</li>
								<li>
									<span>2</span>
								</li>
								<li>
									<span>3</span>
								</li>
								<li>
									<span>4</span>
								</li>
								<li>
									<span>5</span>
								</li>
								<li>
									<span>6</span>
								</li>
								<li>
									<span>7</span>
								</li>
								<li>
									<span>8</span>
								</li>
								<li>
									<span>9</span>
								</li>

							</ul>
						</div>

					</li>
					<li class="weixuanzhong" >
						<div class="news2" val="千">
							<ul>
								<li>
									<span>0</span>
								</li>
								<li>
									<span>1</span>
								</li>
								<li>
									<span>2</span>
								</li>
								<li>
									<span>3</span>
								</li>
								<li>
									<span>4</span>
								</li>
								<li>
									<span>5</span>
								</li>
								<li>
									<span>6</span>
								</li>
								<li>
									<span>7</span>
								</li>
								<li>
									<span>8</span>
								</li>
								<li>
									<span>9</span>
								</li>

							</ul>
						</div>
					</li>
					<li class="weixuanzhong">
						<div class="news3"  val="百">
							<ul>
								<li>
									<span>0</span>
								</li>
								<li>
									<span>1</span>
								</li>
								<li>
									<span>2</span>
								</li>
								<li>
									<span>3</span>
								</li>
								<li>
									<span>4</span>
								</li>
								<li>
									<span>5</span>
								</li>
								<li>
									<span>6</span>
								</li>
								<li>
									<span>7</span>
								</li>
								<li>
									<span>8</span>
								</li>
								<li>
									<span>9</span>
								</li>

							</ul>
						</div>
					</li>
					<li class="weixuanzhong" >
						<div class="news4" val="十">
							<ul>
								<li>
									<span>0</span>
								</li>
								<li>
									<span>1</span>
								</li>
								<li>
									<span>2</span>
								</li>
								<li>
									<span>3</span>
								</li>
								<li>
									<span>4</span>
								</li>
								<li>
									<span>5</span>
								</li>
								<li>
									<span>6</span>
								</li>
								<li>
									<span>7</span>
								</li>
								<li>
									<span>8</span>
								</li>
								<li>
									<span>9</span>
								</li>

							</ul>
						</div>
					</li>
					<li class="xuanzhong" >
						<div class="news5" val="个">
							<ul>
								<li>
									<span class="font">0</span>
								</li>
								<li>
									<span class="font">1</span>
								</li>
								<li>
									<span class="font">2</span>
								</li>
								<li>
									<span class="font">3</span>
								</li>
								<li>
									<span class="font">4</span>
								</li>
								<li>
									<span class="font">5</span>
								</li>
								<li>
									<span class="font">6</span>
								</li>
								<li>
									<span class="font">7</span>
								</li>
								<li>
									<span class="font">8</span>
								</li>
								<li>
									<span class="font">9</span>
								</li>

							</ul>
						</div>
					</li>
				</ul>
			</div>
			<!--猜大小-->
			<div class="dxWra">
				<img src="__STATIC__/home/images/da-wxz.png" id="da"/>
				<img src="__STATIC__/home/images/xiao-wxz.png"  id="xiao"/>
				<p class="zhushu">
					<img src="/static/home/images/jian.png">
					<input type="text" value="10" maxlength="4" >
					<img src="/static/home/images/jia.png">
				</p>
				<span class="dbxuanze">夺宝</span>
				<span class="queding">确定</span>
				<!--列表-->
				<div class="info">
				</div>
			</div>
			<!--夺宝记录-->
			<div class="jiluWra">
				<div class="jilutop">
					<h3>夺宝记录</h3>
					<span>最近十期...</span>
				</div>
				<!--数据框-->
				<div class="shujuKuang">
					<div class="jianbian1"></div>
					<div class="jianbian2"></div>
					<div class="news6">
						<ul>
							{volist name="bet" id="vo"}
							<li>
								<p style="width:80%;">
									<span style="width:45%;float:left;">{$vo.expect}&nbsp;&nbsp;期</span><span style="width:45%">{$vo.content}</span><span style="width:20%;float:right;">{$vo.number}注</span>
								</p>
							</li>
							{/volist}
						</ul>
					</div>
				</div>
			</div>
			<div class="bottomW">
			</div>

			<!-- 投注弹框-->
			<div class="mengbanWra">
				<div class="touzhutankuang">
					<ul class="numberList">
						<li>0</li>
						<li>1</li>
						<li>2</li>
						<li>3</li>
						<li>4</li>
						<li>5</li>
						<li>6</li>
						<li>7</li>
						<li>8</li>
						<li>9</li>
					</ul>
					<span>确定</span>
				</div>
			</div>
			<!--注数选框-->
			<div class="zhushuWra">
				<div class="zhushuokuang">
					<img src="__STATIC__/home/images/jian.png" />
					<input type="text" value="10" maxlength="4" />
					<img src="__STATIC__/home/images/jia.png" />
					<p>确定</p>
				</div>
			</div>
			<!--单位弹框-->
			<div class="danweiWra">
				<div class="danweiKuang">
					<ul>
						<li>万</li>
						<li>千</li>
						<li>百</li>
						<li>十</li>
						<li class="beijingtu">个</li>
					</ul>
					<p>确定</p>
				</div>
			</div>
			<!--大小注数弹框-->
			<div class="dxzsKuang">
				<div class="zhushuokuang">
					<img src="__STATIC__/home/images/jian.png" />
					<input type="text" value="10" maxlength="4" id="zhu" />
					<img src="__STATIC__/home/images/jia.png" />
					<p id="queding">确定</p>
				</div>
			</div>
			<!-- 投注信息是否购买-->
			<div class="goumaiWra">
				<div class="goumai">
					<ul>
						<li>
							<div>
								<p><span></span>位</p>
								<p><span></span>注<span></span></p>
							</div>
						</li>
						<li></li>
						<li></li>
						<li></li>
						<li></li>
					</ul>
					<p>共计<span></span>注，立即购买</p>
					<div class="xuanze">
						<p class="off">取消</p>
						<p class="true">确定</p>
					</div>
				</div>
			</div>
		</div>
	</body>

</html>
<script src="http://libs.baidu.com/jquery/2.0.0/jquery.min.js"></script>
<script src="__STATIC__/home/js/zepto.min.js" type="text/javascript" charset="utf-8"></script>
<script src='__STATIC__/home/js/hhSwipe.js' type="text/javascript"></script>
<script type="text/javascript">
    //引用底部栏
    $(".bottomW").load("{:url('index/bottom')}")
	//数据轮播
	var scrollTimer;
	$(function() {
		var $this = $(".news1");
		var scrollTimer;
		$this.hover(function() {
			clearInterval(scrollTimer);
		}, function() {
			scrollTimer = setInterval(function() {
				scrollNews($this);
			}, 1200);
		}).trigger("mouseleave");

		function scrollNews(obj) {
			var $self = obj.find("ul");
			var lineHeight = $self.find("li:first").height();
			$self.animate({
				"marginTop": -lineHeight + "px"
			}, 800, function() {
				$self.css({
					marginTop: 0
				}).find("li:first").appendTo($self);
			})
		}
	})
	$(function() {
		var $this = $(".news2");
		var scrollTimer;
		$this.hover(function() {
			clearInterval(scrollTimer);
		}, function() {
			scrollTimer = setInterval(function() {
				scrollNews($this);
			}, 1200);
		}).trigger("mouseleave");

		function scrollNews(obj) {
			var $self = obj.find("ul");
			var lineHeight = $self.find("li:first").height();
			$self.animate({
				"marginTop": -lineHeight + "px"
			}, 800, function() {
				$self.css({
					marginTop: 0
				}).find("li:first").appendTo($self);
			})
		}
	})
	$(function() {
		var $this = $(".news3");
		var scrollTimer;
		$this.hover(function() {
			clearInterval(scrollTimer);
		}, function() {
			scrollTimer = setInterval(function() {
				scrollNews($this);
			}, 1200);
		}).trigger("mouseleave");

		function scrollNews(obj) {
			var $self = obj.find("ul");
			var lineHeight = $self.find("li:first").height();
			$self.animate({
				"marginTop": -lineHeight + "px"
			}, 800, function() {
				$self.css({
					marginTop: 0
				}).find("li:first").appendTo($self);
			})
		}
	})
	$(function() {
		var $this = $(".news4");
		var scrollTimer;
		$this.hover(function() {
			clearInterval(scrollTimer);
		}, function() {
			scrollTimer = setInterval(function() {
				scrollNews($this);
			}, 1200);
		}).trigger("mouseleave");

		function scrollNews(obj) {
			var $self = obj.find("ul");
			var lineHeight = $self.find("li:first").height();
			$self.animate({
				"marginTop": -lineHeight + "px"
			}, 800, function() {
				$self.css({
					marginTop: 0
				}).find("li:first").appendTo($self);
			})
		}
	})
	$(function() {
		var $this = $(".news5");
		var scrollTimer;
		$this.hover(function() {
			clearInterval(scrollTimer);
		}, function() {
			scrollTimer = setInterval(function() {
				scrollNews($this);
			}, 1200);
		}).trigger("mouseleave");

		function scrollNews(obj) {
			var $self = obj.find("ul");
			var lineHeight = $self.find("li:first").height();
			$self.animate({
				"marginTop": -lineHeight + "px"
			}, 800, function() {
				$self.css({
					marginTop: 0
				}).find("li:first").appendTo($self);
			})
		}
	})
	$(function() {
		var $this = $(".news6");
		var scrollTimer;
		$this.hover(function() {
			clearInterval(scrollTimer);
		}, function() {
			scrollTimer = setInterval(function() {
				scrollNews($this);
			}, 1200);
		}).trigger("mouseleave");

		function scrollNews(obj) {
			var $self = obj.find("ul");
			var lineHeight = $self.find("li:first").height();
			$self.animate({
				"marginTop": -lineHeight + "px"
			}, 800, function() {
				$self.css({
					marginTop: 0
				}).find("li:first").appendTo($self);
			})
		}
	})




    //ajax轮询更新期数是否开奖
    expect = '{$code.expect}';
	state = 0;
    setInterval("test()",1000);
    function test() {
        $.ajax({
            type: "POST",
            url: "{:url('bet/ajax')}",
            timeout: 60000,
            async: true,
            data: {'expect':expect,'type':1},
            success: function(data) {
                var s = JSON.parse(data);
                if(s.msg == 0) {
                    state = 1;//可以下注
                    $('.duobaowenzi').find('span').html(expect+'正在投注')
                }else if(s.msg == 1){
                    state = 0;//正在开奖
                    $('.duobaowenzi').find('span').html(expect+'正在开奖')
                }else{
                    expect = s.expect;
                }
            }
        });
		console.log(state)
    }

	var bool = true;
	shuwei = '';
	shushu = '';
	//投注选择数字
	$(".number").find("li").find("div").click(function() {
        $(this).parent("li").siblings().attr("class", "weixuanzhong");
        $(this).parent("li").attr("class", "xuanzhong");
        shuwei = $(this).attr('val');
        //显示所有数
		$(".mengbanWra").show();
		$(".touzhutankuang").find("li").click(function() {
			if (bool){
				bool = false;
				setTimeout(function () {
                    bool = true;
                },200)
				if ($(this).hasClass("beijingtu")){
					$(this).removeClass("beijingtu");
				}else {
					$(this).addClass("beijingtu");
				};
				shushu = '';
				$('.numberList').find('.beijingtu').each(function () {
					shushu = shushu+$(this).html();
				})
				//确定点击
				$(".touzhutankuang").find("span").click(function() {
					$(this).prev().find('li').removeClass('beijingtu');
					if(shushu == ''){
					    alert('未选择数据')
					}else{
                        $(".mengbanWra").hide();
					}
					bool = true;
				})
			}
		})
	})
	$('.queding').click(function () {
		if(!shuwei){
		    alert('请选择号码位置');
			return;
		}
        if(!shushu){
            alert('请选择号码');
            return;
        }
        shuzhu = $('.zhushu').find('input').val();
        if(shushu<1){
            alert('请选择注数');
            return;
		}
        var ul = '<ul class="dxList"><li>'+shuwei+'位</li><li>'+shushu+'</li><li>'+shuzhu+'</li></ul>';
		$('.info').append($(ul));
    })

	//夺宝点击
	$('.dbxuanze').click(function () {
        var weizi = [];
        var haoma = [];
        var zhushu = [];
        var zs = 0
		$('.info').find('ul').each(function () {
			weizi.push($(this).find('li').eq(0).html());
            haoma.push($(this).find('li').eq(1).html());
            zhushu.push($(this).find('li').eq(2).html());
            zs = zs + $(this).find('li').eq(1).html().length * $(this).find('li').eq(2).html()
        })
        if(weizi!='' && haoma!='' && zhushu!=''){

            if(state != 1){
                alert(expect+'期正在开奖中,已停止下注!');
                return;
			}
            firm();
            function firm() {
                //利用对话框返回的值 （true 或者 false）
                if (confirm("共计"+zs+"注,你确定提交吗？")) {
                    $.ajax({
                        url: "{:url('bet/betdata')}",
                        type: 'post',
                        data: {
                            weizi:weizi,
                            haoma:haoma,
                            zhushu:zhushu,
                            type:1,
                            expect:expect,
                            zs:zs
                        },
                        success:function(data) {
                            var status = JSON.parse(data);
                            if(status.msg == 1) {
                                alert(status.info);
                            }else {
                                alert(status.info)
                            }
                        }
                    })
                }else{
                    return;
				}
            }

		}else{
            alert("未选择数据!");
		}


    })







	//选择注数
	//减号
	$(".zhushu img").eq(0).click(function() {
		if($(".zhushu").find("input").val() > 1) {
			$(".zhushu").find("input").val($(".zhushu").find("input").val() - 1);
		} else {
			$(".zhushu").find("input").val($(".zhushu").find("input").val() - 0);
		}
	})
	//加号
	$(".zhushu img").eq(1).click(function() {
		console.log($(".zhushu").find("input").val())
		$(".zhushu").find("input").val($(".zhushu").find("input").val() - 0 + 1);

	})
	$(".zhushu").find("input").blur(function() {
		if($(".zhushu").find("input").val() < 1) {
			$(".zhushu").find("input").val(1)
		}
	})
	$(".zhushu").find("span").eq(3).click(function() {
		$(".zhushuWra").show();
	})

	$(".zhushu").find("span").click(function() {
		$(this).css("color", "#ffffff");
		$(this).css("background", "#ff4747");
		$(this).siblings().css("color", "#000000");
		$(this).siblings().css("background", "#FAFAFA")
	})










	//大
	$("#da").click(function() {
	    ci = 0;
		$(".danweiWra").show();
		//点击单位弹框中的单位
		$(".danweiKuang").find("li").click(function() {
            $(this).siblings().removeClass("beijingtu");
			$(this).addClass("beijingtu");
		});
		//点击单位弹框中确定
		$(".danweiKuang").find("p").click(function() {
            wei = $(".beijingtu").html();
			shu = '56789';
			$(".danweiWra").hide();
			$('.dxzsKuang').show();
		})
		//注数确定
		$('#queding').click(function () {
            zhu= $('#zhu').val();
            ul = '<ul class="dxList"><li>'+wei+'位</li><li>'+shu+'</li><li>'+zhu+'</li></ul>';
            ci++;
            if(ci == 1){
                $('.info').append($(ul));
            }
            $('.dxzsKuang').hide();
        })
	})
    //小
    $("#xiao").click(function() {
        ci = 0;
        $(".danweiWra").show();
        //点击单位弹框中的单位
        $(".danweiKuang").find("li").click(function() {
            $(this).siblings().removeClass("beijingtu");
            $(this).addClass("beijingtu");
        });
        //点击单位弹框中确定
        $(".danweiKuang").find("p").click(function() {
            wei = $(".beijingtu").html();
            shu = '01234';
            $(".danweiWra").hide();
            $('.dxzsKuang').show();
        })
        //注数确定
        $('#queding').click(function () {
            zhu= $('#zhu').val();
            ul = '<ul class="dxList"><li>'+wei+'位</li><li>'+shu+'</li><li>'+zhu+'</li></ul>';
            ci++;
            if(ci == 1){
                $('.info').append($(ul));
            }
            $('.dxzsKuang').hide();
        })
    })
    //选择注数
    //减号
    $(".dxzsKuang .zhushuokuang img").eq(0).click(function() {
        console.log($(".zhushuokuang").find("input").val())
        if($(".zhushuokuang").find("input").val() > 1) {
            $(".zhushuokuang").find("input").val($(".zhushuokuang").find("input").val() - 1);
        } else {
            $(".zhushuokuang").find("input").val($(".zhushuokuang").find("input").val() - 0);
        }
    })
    //加号
    $(".dxzsKuang .zhushuokuang img").eq(1).click(function() {
        console.log($(".zhushuokuang").find("input").val())
        $(".zhushuokuang").find("input").val($(".zhushuokuang").find("input").val() - 0 + 1);

    })
</script>